package com.lee.lease.web.app.controller.lease;


import com.lee.lease.common.result.Result;
import com.lee.lease.model.entity.LeaseTerm;
import com.lee.lease.web.app.service.LeaseTermService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: LeaseTermController
 * Package: com.lee.lease.web.app.controller
 * Description:
 */
@Tag(name = "租期信息")
@RestController
@RequestMapping("/app/term")
public class LeaseTermController {
    @Autowired
    private LeaseTermService leaseTermService;

    @Operation(summary = "根据房间id获取可选租期列表")
    @GetMapping("listByRoomId")
    public Result getListByRoomId(Integer id){
        LeaseTerm leaseTerm = leaseTermService.getById(id);
        return Result.ok(leaseTerm);
    }
}
